<?php

namespace App\Models;

use App\User;
use Illuminate\Database\Eloquent\Model;

class Work extends Model
{
    protected $fillable = [
        'timetable_id',
        'user_id',
        'date',
    ];

    public function users()
    {
        return $this->hasOne(User::class , 'id' , 'user_id');
    }

    public function timetable()
    {
        return $this->hasOne(Timetable::class , 'id' , 'timetable_id' );
    }
}
